1. Field of the Invention
The present invention relates to an image processing apparatus and control method that control image data.
2. Description of the Related Art
Recently proliferating copying machines cause a CCD sensor or the like to read a color document image and a digital printer to output the image data. FIG. 1 shows an example of the schematic arrangement of a copying machine. Image data input from an image scan unit 1001 undergoes scan image processing by an image processing unit 1002. And, a storage unit 1004 temporarily holds the processed image data. For printing, the image data held in the storage unit 1004 is sent to the image processing unit 1002, subjected to print image processing, and then sent to a print unit 1003.
More specifically, attribute data representing a character, halftone dot, background, and the like are generated from the input image data. A memory holds the generated attribute data. The image data adaptively undergoes filtering, gamma processing, tone processing, and the like in accordance with the attribute data. The image data is temporarily held in the memory, subjected to adaptive processing based on the attribute data, and output from the print unit. Since the scan image processing and print image processing implement high-quality image output, it is important to generate accurate attribute data. To efficiently utilize the memory, it is important to reduce the attribute data amount.
Note that to generate the attribute data of an input image, various methods based on image data in real space have conventionally been proposed. For example, there is available an image processing scheme of determining, based on frequency components obtained by orthogonal transformation of a block formed from a predetermined number of pixels of an input image, whether the block is a character area or a halftone dot area (Japanese Patent Laid-Open No. 64-81080). In another image processing scheme, each pixel of a block is determined to be a character pixel or a halftone dot pixel based on frequency components obtained by orthogonal transformation of the block. The attribute of most pixels is defined as the attribute of the block (Japanese Patent Laid-Open No. 2002-262081). Still another image processing scheme determines, based on the pixel value processed using an edge filter in a predetermined direction of a block, whether each pixel of the block is a character pixel or a halftone dot pixel (Japanese Patent Laid-Open No. 2004-350240).
However, the above-described conventional techniques have the following problems. In the schemes described in Japanese Patent Laid-Open Nos. 64-81080 and 2002-262081, each predetermined block is determined to be a character area or a halftone dot area, and image processing is applied in accordance with the attribute of the block. The scheme described in Japanese Patent Laid-Open No. 64-81080 determines the attribute based on spatial frequencies of each predetermined block. If a block attribute determination error has occurred, no appropriate image processing can be executed, and the image quality degrades. The scheme described in Japanese Patent Laid-Open No. 2002-262081 determines the attribute of each pixel of a predetermined block, and determines the block attribute by totalizing the number of pixels of each attribute. This ensures a high block attribute determination accuracy. In this scheme, however, if pixels of a different attribute mix in the predetermined block, the block attribute is determined to be one of the attributes of the mixed pixels, and this disables correct classification and determination of each attribute portion. It is therefore impossible to output a high-quality image.
In the scheme described in Japanese Patent Laid-Open No. 2004-350240, each pixel of a predetermined block is determined as one of a character pixel and a halftone dot pixel, and image processing is applied in accordance with the attribute of the pixel. The attribute determination of each pixel readily causes a determination error due to the influence of noise and the like. Especially in a character area, only pixels at the edge portions of a character are determined to have the character attribute. Since pixels inside the character are not determined to have the character attribute, the image processing result deteriorates. Although the scheme described in Japanese Patent Laid-Open No. 2004-350240 has made some contrivances for attribute data generation, a considerable memory capacity is necessary for storing the attribute of each pixel.